import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { RouterModule } from '@angular/router';

import { NzIconModule } from 'ng-zorro-antd/icon';
import { AlertFill } from '@ant-design/icons-angular/icons';
import { IconDefinition } from '@ant-design/icons-angular';
import { DemoNgZorroAntdModule } from '../../NG-ZORRO/ng-zorro-antd.module';
// 封装组件module
import { sharedModule } from '../../sharedModule/shared.module';
import {CustomizationRoutingModule} from './customization-routing.module';
import { CommodityComponent } from './commodity/commodity.component';
import { CommodityEditComponent } from './commodity/commodity-edit/commodity-edit.component';
import { CommodityCategoryComponent } from './commodity/commodity-category/commodity-category.component';
import { CommoditySpecificationComponent } from './commodity/commodity-specification/commodity-specification.component';
import { HairShellListComponent } from './hair-shell/hair-shell-list/hair-shell-list.component';
import { HairShellDetailsComponent } from './hair-shell/hair-shell-details/hair-shell-details.component';
import { ClaimStatusPipe, ReceivedNumPipe, UseStatusPipe } from './customization.pipe';
import {
    CustomizedCouponStatusPipe,
    AdzUserCouponStatusPipe,
    CustomizedDescentStatusPipe,
    CustomizedOrderStatusPipe
} from './customized-coupon-manage/customized-coupon-manage.pipe';
import { ManualReleaseModalComponent } from './customized-coupon-manage/components/manual-release-modal/manual-release-modal.component';
import { CustomizedCouponListComponent } from './customized-coupon-manage/customized-coupon-list/customized-coupon-list.component';
import { CustomizedCouponEditComponent } from './customized-coupon-manage/customized-coupon-edit/customized-coupon-edit.component';
import { CustomizedCouponDetailsComponent } from './customized-coupon-manage/customized-coupon-details/customized-coupon-details.component';
import { CustomizedDescentListComponent } from './customized-coupon-manage/customized-descent-list/customized-descent-list.component';
import { CustomizedDescentEditComponent } from './customized-coupon-manage/customized-descent-edit/customized-descent-edit.component';
import { CustomizedDescentDetailsComponent } from './customized-coupon-manage/customized-descent-details/customized-descent-details.component';
const icons: IconDefinition[] = [AlertFill];

const customizedPipeArrs = [
    ClaimStatusPipe,
    ReceivedNumPipe,
    UseStatusPipe,
    CustomizedCouponStatusPipe,
    AdzUserCouponStatusPipe,
    CustomizedDescentStatusPipe,
    CustomizedOrderStatusPipe
];

@NgModule({
    declarations: [
        ...customizedPipeArrs,
        CommodityComponent,
        CommodityEditComponent,
        CommodityCategoryComponent,
        CommoditySpecificationComponent,
        HairShellListComponent,
        HairShellDetailsComponent,
        ManualReleaseModalComponent,
        CustomizedCouponListComponent,
        CustomizedCouponEditComponent,
        CustomizedCouponDetailsComponent,
        CustomizedDescentListComponent,
        CustomizedDescentEditComponent,
        CustomizedDescentDetailsComponent,
    ],
    imports: [
        CommonModule,
        RouterModule,
        DemoNgZorroAntdModule,
        NzIconModule.forRoot(icons),
        ReactiveFormsModule,
        FormsModule,
        sharedModule,
        CustomizationRoutingModule,
    ]
})
export class CustomizationModule { }
